﻿using com.guojin.core.io.message;
using com.guojin.core.io;

namespace com.guojin.mj.net.message.login
{
    public class PhoneRegister : Message
    {
        public static int TYPE = 7;
        public static int ID = 144;

        private string phoneNumber;
        private string password;

        public string PhoneNumber
        {
            get
            {
                return phoneNumber;
            }

            set
            {
                phoneNumber = value;
            }
        }
        public string Password
        {
            get
            {
                return password;
            }
            set
            {
                password = value;
            }
        }
        public static PhoneRegister Create(string acc,string pas) {
            PhoneRegister pc = new login.PhoneRegister();
            pc.phoneNumber = acc;
            pc.password = pas;
            return pc;
        }
        public void decode(core.io.Input _in)
        {

        }
        public void encode(Output _out)
        {
            _out.writeString(phoneNumber);
            _out.writeString(password);
        }
        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }
        public string toString()
        {
            return "phoneNumber"+ phoneNumber+ "password"+ password;
        }
    }
}
